/**
 * Created by Administrator on 2017\9\21 0021.
 * 套餐列表
 */
import React from 'react';
import template from './../../commonui/template';
import { Link } from 'react-router-dom';
import { Form, Input, Tooltip, Icon, Cascader, Select, Row, Col, Checkbox, Button, AutoComplete } from 'antd';
const Search = Input.Search;
const FormItem=Form.Item;
import UsrHeader from './UsrHeader';
import Package from './Package';

class PackageList extends React.Component{
    constructor(props){
        super(props);
        this.state={
             user: this.props.location.state&&this.props.location.state.user,
            lb:this.props.location.state&&this.props.location.state.lb
        }
        this.drawPackages=this.drawPackages.bind(this);

    }
    drawPackages(){
        /******ajax获取机构数据*****/
        let data=[
            {
                id:'1',
                Name:'PK Package',
                Address:'PK Address',
                Institution:'PK Institution',
                Introduce:'just $4'
            },{
                id:'2',
                Name:'CK Package',
                Address:'CK Address',
                Institution:'CK Institution',
                Introduce:'special server'
            }
        ];
        let Packages=data.map((options,index)=>{
            return <Package  info = {options}/>
        })
        return Packages;
    }
    render(){
        return(
            <div>
                <UsrHeader info={this.state} />
                <div>
                    {this.drawPackages()}
                </div>
            </div>
        )
    }
}

export default template({
    id: 'PackageList',
    component: PackageList
});

